<script type="text/javascript">
    function cb_function() {
        if ($('input[name=cb_more_info]').is(':checked')) {
            $('div[id=more_info]').show();
            $('label[id=lb_cb]').css("color","orange");
        }
        else {
            $('div[id=more_info]').hide();
            $('label[id=lb_cb]').css("color","#444444");
        }
    }
    function rd_function1(){
        $('label[id=lb_rd_agree1]').css("color","orange");
        $('label[id=lb_rd_agree0]').css("color","#444444");
    }
    function rd_function0(){
        $('label[id=lb_rd_agree0]').css("color","orange");
        $('label[id=lb_rd_agree1]').css("color","#444444");
    }

</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('dd').hide();
        $('.active').removeClass('active');
        $('dt a').click(function()  {
            $('dd:visible').slideUp('slow');
            $('.active').removeClass('active');
            $(this).parent().addClass('active').next().slideDown('slow');
            return false;
        });
        $('#return_top').click(function() {
            $('html, body').animate({scrollTop:0},500);
        });

    });
</script>
<div id="create" style="width: 98%;">
    <?php if ($error_warning) { ?>
    <div style="text-align: center;" class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    <form id="create_form" action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
        <b style="margin-bottom: 3px; margin-top: 10px; display: block;">Chi tiết thông tin cá nhân</b>

        <div style="background: #F6F9FF; border: 1px solid #DDDDDD;border-left: 1%;border-right: 1%;
             padding: 10px;padding-left: 2%;padding-right: 2%; margin-bottom: 10px; font-weight: normal;">
            <table width="90%">
                <tr>
                    <td width="30%"><?php echo $entry_username; ?></td>
                    <td width="60%">
                        <input type="text" class="create_account" name="username" value="<?php echo $username; ?>" />
                        <span class="required" style="color: red">(*)</span>
                        <?php if ($error_username) { ?>
                        <span class="error"><?php echo $error_username; ?></span>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><?php echo $entry_email; ?></td>
                    <td><input class="create_account" type="text" name="email" value="<?php echo $email; ?>" />
                        <span class="required" style="color: red">(*)</span>
                        <?php if ($error_email) { ?>
                        <span class="error"><?php echo $error_email; ?></span>
                        <?php } ?>
                    </td>

                </tr>
                <tr>
                    <td><?php echo $entry_lastname; ?></td>
                    <td><input class="create_account" type="text" name="lastname" value="<?php echo $lastname; ?>" />
                        <?php if ($error_lastname) { ?>
                        <span class="error"><?php echo $error_lastname; ?></span>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td width="30%"><?php echo $entry_firstname; ?></td>
                    <td><input class="create_account" type="text" name="firstname" value="<?php echo $firstname; ?>" />
                        <?php if ($error_firstname) { ?>
                        <span class="error"><?php echo $error_firstname; ?></span>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><?php echo $entry_telephone; ?></td>
                    <td><input class="create_account" type="text" name="telephone" value="<?php echo $telephone; ?>" />
                        <?php if ($error_telephone) { ?>
                        <span class="error"><?php echo $error_telephone; ?></span>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><?php echo $entry_ym; ?></td>
                    <td><input class="create_account" type="text" name="ym" value="<?php echo $ym; ?>" />
                        <?php if ($error_ym) { ?>
                        <span class="error"><?php echo $error_ym; ?></span>
                        <?php } ?>
                    </td>

                </tr>
                <tr>
                    <td><?php echo $entry_skype; ?></td>
                    <td><input class="create_account" type="text" name="skype" value="<?php echo $skype; ?>" />
                        <?php if ($error_telephone) { ?>
                        <span class="error"><?php echo $error_skype; ?></span>
                        <?php } ?>
                    </td>
                </tr>
            </table>
        </div>

        <b style="margin-bottom: 3px; display: block;"><?php echo $text_your_password; ?></b>

        <div style="background:#F6F9FF;border: 1px solid #DDDDDD;border-left: 1%;border-right: 1%;
             padding: 10px;padding-left: 2%;padding-right: 2%;margin-bottom: 10px;">
            <table width="90%">
                <tr>
                    <td width="30%"><?php echo $entry_password; ?></td>
                    <td width="60%"><input class="create_account" type="password" name="password" value="<?php echo $password; ?>"/>
                        <span class="required" style="color: red">(*)</span>
                        <?php if ($error_password) { ?>
                        <span class="error"><?php echo $error_password; ?></span>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><?php echo $entry_confirm; ?></td>
                    <td><input class="create_account" type="password" name="confirm" value="<?php echo $confirm; ?>" />
                        <span class="required" style="color: red">(*)</span>
                        <?php if ($error_confirm) { ?>
                        <span class="error"><?php echo $error_confirm; ?></span>
                        <?php } ?>
                    </td>
                </tr>
            </table>
        </div>

        <div style="margin-top: 10px">
            <table>
                <tr>
                    <td width="20%"><label id="lb_cb" style="cursor: pointer; color: #444444; background-color: #f2f6f8 ">
                            <input type="checkbox" name="cb_more_info" onclick="cb_function()"/>Bổ sung thông tin</label> </td>
                </tr>
            </table>

        </div>

        <div id="more_info" style="background: #F6F9DD; border: 1px solid #DDDDDD;border-left: 1%;
             border-right: 1%;padding: 10px;padding-left: 2%;padding-right: 2%; margin-bottom: 10px;display: none;">
            <b style="margin-bottom: 3px; display: block;">Địa chỉ</b>
            <table width="90%">
                <tr>
                    <td width="30%"><?php echo $entry_fax; ?></td>
                    <td width="60%"><input class="create_account" type="text" name="fax" value="<?php echo $fax; ?>" /></td>
                </tr>

                <tr>
                    <td width="30%"><?php echo $entry_company; ?></td>
                    <td><input  class="create_account" type="text" name="company" value="<?php echo $company; ?>" /></td>
                </tr>
                <tr>
                    <td><?php echo $entry_address_1; ?></td>
                    <td><input class="create_account" type="text" name="address_1" value="<?php echo $address_1; ?>" />
                        <?php if ($error_address_1) { ?>
                        <span class="error"><?php echo $error_address_1; ?></span>
                        <?php } ?>
                    </td>
                <tr>
                    <td><?php echo $entry_address_2; ?></td>
                    <td><input class="create_account" type="text" name="address_2" value="<?php echo $address_2; ?>" />
                        <input class="create_account" type="hidden" name="customer_group_id" value="0" />
                    </td>
                </tr>
                <tr>
                    <td><?php echo $entry_country; ?></td>
                    <td><select style="width: 30%;" name="country_id" id="country_id"
                                onchange="$('#zone').load('index.php?route=account/create/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
                            <?php foreach ($countries as $country) { ?>
                            <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
                            <?php } ?>
                        </select></td>
                </tr>
                <tr>
                    <td><?php echo $entry_zone; ?></td>
                    <td id="zone">
                        <select style="width: 30%;" name="zone_id">
                        </select>
                    </td>
                </tr>
            </table>
        </div>
        <div id="create_capchase" style="background: #F6F9FF; border: 1px solid #DDDDDD;border-left: 1%;border-right: 1%;
             padding: 10px; padding-left: 2%;padding-right: 2%; margin-top: 10px;">
            <table>
                <tr>
                    <td width="30%">Nhập mã sau:</td>
                    <td width="30%"><input type="text" /> <td>
                    <td width="30%"><img id="img_capchase" src="view/image/logo.gif" alt="capchase" /> <td>
                </tr>
            </table>
        </div>
        <b style="margin-bottom: 3px; display: block;">Đồng ý nhận mail</b>

        <div style="background: #F6F9FF; border: 1px solid #DDDDDD;border-left: 1%;border-right: 1%;
             padding: 10px; padding-left: 2%;padding-right: 2%; margin-bottom: 10px;font-weight: normal;">
            <table width="90%">
                <tr>
                    <td width="50%"><label id="lb_rd_agree1" style="font-weight:normal; color: #444444;"  >
                            <input  type="radio"  name="newsletter" value="1" checked="checked" onclick="rd_function1()"/><?php echo $text_yes; ?></label></td>
                    <td width="50%"><label id="lb_rd_agree0" style="font-weight:normal;">
                            <input  type="radio"  name="newsletter" value="0"  onclick="rd_function0()" /><?php echo $text_no; ?></label></td>
                </tr>
            </table>
        </div>

        <div class="buttons" style="background: #F6F9FF; border: 1px solid #DDDDDD;border-left: 1%;border-right: 1%;
             padding: 10px; padding-left: 2%;padding-right: 2%; margin-bottom: 10px;font-weight: normal;">
            <table width="90%">
                <tr>
                    <td>Tôi đã đọc và đồng ý với những quy định này <a href="">Thỏa thuận</a>
                        <input type="checkbox" checked="checked" name="agree" value="1"/>
                    </td>

                </tr>
                <tr>
                    <td style="text-align: right">
                        <a style="font-weight:bold; background: #d7d2cb; cursor: pointer;
                           radius:2px;
                           padding: 2px 1%;
                           border: 2px solid #0072BC; " 
                           onclick="$('#create_form').submit();" class="button">
                            <span><?php echo $button_continue; ?></span></a>

                        <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />

                    </td>
                <tr>
            </table>
        </div>
    </form>
</div>